package cn.edu.gduf.luowowo.article.query;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

@Setter
@Getter
@AllArgsConstructor
public class TravelCondition {
    private int min;
    private int max;

    //出行天数
    public static final HashMap<Integer, TravelCondition> dayTypeMap = new HashMap();
    //出发时间
    public static final HashMap<Integer, TravelCondition> travelTimeTypeMap = new HashMap();
    //人均花费
    public static final HashMap<Integer, TravelCondition> perExpendTypeMap = new HashMap();

    static {
        //出行天数做映射
        dayTypeMap.put(-1, null);
        dayTypeMap.put(1, new TravelCondition(0, 3));
        dayTypeMap.put(2, new TravelCondition(4, 7));
        dayTypeMap.put(3, new TravelCondition(8, 14));
        dayTypeMap.put(4, new TravelCondition(15, Integer.MAX_VALUE));

        //人均花费做映射
        perExpendTypeMap.put(-1, null);
        perExpendTypeMap.put(1, new TravelCondition(1, 999));
        perExpendTypeMap.put(2, new TravelCondition(1000, 6000));
        perExpendTypeMap.put(3, new TravelCondition(6001, 20000));
        perExpendTypeMap.put(4, new TravelCondition(20001, Integer.MAX_VALUE));

        //出行时间做映射
        travelTimeTypeMap.put(-1, null);
        travelTimeTypeMap.put(1, new TravelCondition(1, 2));
        travelTimeTypeMap.put(2, new TravelCondition(3, 4));
        travelTimeTypeMap.put(3, new TravelCondition(5, 6));
        travelTimeTypeMap.put(4, new TravelCondition(7, 8));
        travelTimeTypeMap.put(5, new TravelCondition(9, 10));
        travelTimeTypeMap.put(6, new TravelCondition(11, 12));

    }
}
